Dynamic pulse-width modulation motor control and medical device incorporating same

ABSTRACT

Apparatus are provided for motor control systems and related medical devices. In one embodiment, a control system includes a motor having a rotor, a sensor to obtain a measured displacement that is influenced by rotation of the rotor, and a control module coupled to the sensor. The control module adjusts a duty cycle for a modulated voltage applied to the motor in response to a difference between an expected displacement and the measured displacement. The expected displacement is influenced by or otherwise corresponds to a commanded rotation of the rotor.

CROSS-REFERENCE TO RELATED APPLICATIONS

The subject matter described here is related to the subject matterdescribed in U.S. patent application Ser. No. ______ (attorney docket009.5050), and U.S. patent application Ser. No. ______ (attorney docket009.5051), both filed concurrently herewith.

TECHNICAL FIELD

Embodiments of the subject matter described herein relate generally tomotor controls and related medical devices, and more particularly,embodiments of the subject matter relate to dynamic control of motors influid infusion devices using a modulated voltage.

BACKGROUND

Infusion pump devices and systems are relatively well-known in themedical arts, for use in delivering or dispensing an agent, such asinsulin or another prescribed medication, to a patient. A typicalinfusion pump includes a pump drive system which typically includes asmall motor and drive train components that convert rotational motormotion to a translational displacement of a stopper (or plunger) in areservoir. The reservoir cooperates with tubing, a catheter and/or aninfusion set to create a fluid path for carrying medication from thereservoir to the body of a user. Some fluid infusion devices alsoinclude a force sensor designed to detect and indicate a pumpmalfunction and/or non-delivery of the medication to the patient due toa fluid path occlusion.

Stepper motors may be used to displace the stopper by a precise amount,and thereby control the dosage administered to a user. Traditionally, astepper motor is supplied with a direct current (DC) voltage to controland/or maintain position, and thus, the stepper motor continuouslyconsumes power during use. Additionally, stepper motors are frequentlycontrolled using an open-loop control scheme, where the voltage appliedto the stepper motor is chosen to be large enough to ensure the steppermotor provides torque that meets or exceeds the likely maximumrequirements of the system, thereby ensuring that the stepper motorachieves a number of commanded steps and obviating the need for feedbackmechanisms to monitor the position. However, most infusion pump devicesand other portable medical devices are battery powered, and accordingly,it is desirable to reduce the power consumption of the stepper motor andprolong battery life.

BRIEF SUMMARY

An embodiment of a motor control system is provided. The system includesa motor having a rotor, a sensor to obtain a measured displacement thatis influenced by rotation of the rotor, and a control module coupled tothe sensor. The control module adjusts a duty cycle for a modulatedvoltage applied to the motor in response to a difference between anexpected displacement and the measured displacement. The expecteddisplacement is influenced by or otherwise corresponds to a commandedrotation of the rotor.

Also provided is an embodiment of an infusion device. The infusiondevice includes a motor having a rotor and a shaft mechanically coupledto the rotor, wherein the shaft is displaced to deliver fluid inresponse to rotation of the rotor. The infusion device also includes asensor to obtain a measured displacement that is influenced by rotationof the rotor and a control module coupled to the motor and the sensor.The control module operates the motor to provide a commanded rotation ofthe rotor while a modulated voltage is applied to the motor and adjustsa duty cycle for the modulated voltage in response to a differencebetween an expected displacement corresponding to the commanded rotationand the measured displacement obtained after operating the motor toprovide the commanded rotation.

In another embodiment, a method for controlling a motor is provided. Themethod involves applying a modulated voltage to the motor to produce acommanded rotation of a rotor of the motor, determining an expecteddisplacement based on the commanded rotation, obtaining a measureddisplacement influenced by rotation of the rotor in response to applyingthe modulated voltage to the motor to produce the commanded rotation,and adjusting a duty cycle of the modulated voltage in response to adifference between the expected displacement and the measureddisplacement.

This summary is provided to introduce a selection of concepts in asimplified form that are further described below in the detaileddescription. This summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used as an aid in determining the scope of the claimed subjectmatter.

BRIEF DESCRIPTION OF THE DRAWINGS

A more complete understanding of the subject matter may be derived byreferring to the detailed description and claims when considered inconjunction with the following figures, wherein like reference numbersrefer to similar elements throughout the figures.

FIG. 1 depicts an exemplary embodiment of an infusion system;

FIG. 2 is a perspective view of an embodiment of a fluid infusion devicesuitable for use in the infusion system of FIG. 1;

FIG. 3 is a perspective view that depicts internal structure of thedurable housing of the fluid infusion device shown in FIG. 2;

FIG. 4 is a perspective view of an exemplary drive system suitable foruse in the durable housing of the fluid infusion device of FIGS. 2-3;

FIG. 5 is cross-sectional perspective view of the motor of motor drivesystem of FIG. 4 illustrating a sensor integrated therein;

FIG. 6 is a perspective view of the exemplary drive system of FIG. 4illustrating the gear assembly engaged with a shaft;

FIG. 7 is a block diagram of an exemplary motor control system suitablefor use in the fluid infusion device of FIGS. 2-3;

FIG. 8 is a flow diagram of an exemplary motor control process suitablefor use with the motor control system of FIG. 7;

FIG. 9 is a flow diagram of an exemplary occlusion detection processsuitable for use with the motor control system of FIG. 7 in connectionwith the motor control process of FIG. 8; and

FIG. 10 is a flow diagram of an exemplary degradation detection processsuitable for use with the motor control system of FIG. 7 in connectionwith the motor control process of FIG. 8.

DETAILED DESCRIPTION

The following detailed description is merely illustrative in nature andis not intended to limit the embodiments of the subject matter or theapplication and uses of such embodiments. As used herein, the word“exemplary” means “serving as an example, instance, or illustration.”Any implementation described herein as exemplary is not necessarily tobe construed as preferred or advantageous over other implementations.Furthermore, there is no intention to be bound by any expressed orimplied theory presented in the preceding technical field, background,brief summary or the following detailed description.

Embodiments of the subject matter described herein generally relate tocontrolling the displacement (or rotational position) of a motor bydynamically adjusting the duty cycle of a modulated voltage, such as apulse-width modulated voltage, that is applied the motor. In exemplaryembodiments, a pulse-width modulated voltage is applied to the motor andthe motor is operated to produce a commanded amount of rotation (ordisplacement). Based on the commanded amount of rotation, an expecteddisplacement, either of the rotor or another element mechanicallycoupled to the rotor, that is expected to result from the commandedamount of rotation is determined and compared to a measured displacementobtained from a sensor after the motor is operated to produce thecommanded amount of rotation. In response to a difference between theexpected displacement and the measured displacement, the duty cycle ofthe pulse-width modulated voltage is increased and the motor is operatedto compensate for the difference between the expected displacement andthe measured displacement while a pulse-width modulated voltage havingthe increased duty cycle is applied.

In exemplary embodiments, the motor is a stepper motor or another directcurrent (DC) motor that is commanded to produce a particular number ofmotor steps, and the sensor is an incremental position sensor (e.g., arotary encoder) that measures or otherwise detects incremental rotationsof the rotor, wherein the expected displacement is the number ofincremental rotations of the rotor that are expected to be detected bythe incremental position sensor when the stepper motor achieves thecommanded number of motor steps and the measured displacement is theactual measured number of incremental rotations identified via theincremental position sensor. However, it should be noted that thesubject matter is not limited to stepper motors or incremental positionsensors that detect motor rotation. For example, in some embodiments,the sensor may measure or otherwise detect the position or displacementof the shaft of a stopper (or plunger) that is mechanically coupled tothe rotor of the motor, wherein the expected displacement is thedisplacement (or position) of the shaft (or stopper) that should resultfrom the commanded amount of rotation of the rotor and the measureddisplacement (or position) is the actual measured displacement (orposition) of the shaft via the sensor. As described in greater detailbelow, in exemplary embodiments, the duty cycle of the pulse-widthmodulated voltage is monitored during operation of the motor to detectan anomalous condition, such as an occlusion condition or a degradationcondition, based on the duty cycle. In this regard, when changes in theduty cycle are indicative of an anomalous condition, a notification isgenerated to alert a user or a supervisory control system of thepotential anomaly.

While the subject matter described herein can be implemented in anyelectronic device that includes a motor, exemplary embodiments describedbelow are implemented in the form of medical devices, such as portableelectronic medical devices. Although many different applications arepossible, the following description focuses on a fluid infusion device(or infusion pump) as part of an infusion system deployment. For thesake of brevity, conventional techniques related to infusion systemoperation, insulin pump and/or infusion set operation, and otherfunctional aspects of the systems (and the individual operatingcomponents of the systems) may not be described in detail here. Examplesof infusion pumps may be of the type described in, but not limited to,U.S. Pat. Nos. 4,562,751; 4,685,903; 5,080,653; 5,505,709; 5,097,122;6,485,465; 6,554,798; 6,558,320; 6,558,351; 6,641,533; 6,659,980;6,752,787; 6,817,990; 6,932,584; and 7,621,893 which are hereinincorporated by reference.

Turning now to FIG. 1, in exemplary embodiments, an infusion system 100includes, without limitation, a fluid infusion device (or infusion pump)102, a sensing arrangement 104, a command control device (CCD) 106, anda computer 108. The components of an infusion system may be realizedusing different platforms, designs, and configurations, and theembodiment shown in FIG. 1 is not exhaustive or limiting. In practice,the infusion device 102 and the sensing arrangement 104 are secured atdesired locations on the body of a user (or patient), as illustrated inFIG. 1. In this regard, the locations at which the infusion device 102and the sensing arrangement 104 are secured to the body of the user inFIG. 1 are provided only as a representative, non-limiting, example. Theelements of the infusion system 100 may be similar to those described inU.S. patent application Ser. No. 13/049,803, assigned to the assignee ofthe present application, the subject matter of which is herebyincorporated by reference in its entirety.

In the illustrated embodiment of FIG. 1, the infusion device 102 isdesigned as a portable medical device suitable for infusing a fluid, aliquid, a gel, or other agent into the body of a user. In exemplaryembodiments, the infused fluid is insulin, although many other fluidsmay be administered through infusion such as, but not limited to, HIVdrugs, drugs to treat pulmonary hypertension, iron chelation drugs, painmedications, anti-cancer treatments, medications, vitamins, hormones, orthe like. In some embodiments, the fluid may include a nutritionalsupplement, a dye, a tracing medium, a saline medium, a hydrationmedium, or the like. The sensing arrangement 104 generally representsthe components of the infusion system 100 configured to sense acondition of the user, and may include a sensor, a monitor, or the like,for providing data indicative of the condition that is sensed and/ormonitored by the sensing arrangement. In this regard, the sensingarrangement 104 may include electronics and enzymes reactive to abiological condition, such as a blood glucose level, or the like, of theuser, and provide data indicative of the blood glucose level to theinfusion device 102, the CCD 106 and/or the computer 108. For example,the infusion device 102, the CCD 106 and/or the computer 108 may includea display for presenting information or data to the user based on thesensor data received from the sensing arrangement 104, such as, forexample, a current glucose level of the user, a graph or chart of theuser's glucose level versus time, device status indicators, alertmessages, or the like. In other embodiments, the infusion device 102,the CCD 106 and/or the computer 108 may include electronics and softwarethat are configured to analyze sensor data and operate the infusiondevice 102 to deliver fluid to the body of the user based on the sensordata and/or preprogrammed delivery routines. Thus, in exemplaryembodiments, one or more of the infusion device 102, the sensingarrangement 104, the CCD 106, and/or the computer 108 includes atransmitter, a receiver, and/or other transceiver electronics that allowfor communication with other components of the infusion system 100, sothat the sensing arrangement 104 may transmit sensor data or monitordata to one or more of the infusion device 102, the CCD 106 and/or thecomputer 108. In various embodiments, the sensing arrangement 104 may besecured to the body of the user or embedded in the body of the user at alocation that is remote from the location at which the infusion device102 is secured to the body of the user. In various other embodiments,the sensing arrangement 104 may be incorporated within the infusiondevice 102. In other embodiments, the sensing arrangement 104 may beseparate and apart from the infusion device 102, and may be, forexample, part of the CCD 106. In such embodiments, the sensingarrangement 104 may be configured to receive a biological sample,analyte, or the like, to measure a condition of the user.

As described above, in various embodiments, the CCD 106 and/or thecomputer 108 include electronics and other components configured toperform processing, delivery routine storage, and to control theinfusion device 102 in a manner that is influenced by sensor datameasured by and/or received from the sensing arrangement 104. Byincluding control functions in the CCD 106 and/or the computer 108, theinfusion device 102 may be made with more simplified electronics.However, in other embodiments, the infusion device 102 may include allcontrol functions, and may operate without the CCD 106 and/or thecomputer 108. In various embodiments, the CCD 106 may be a portableelectronic device. In addition, in various embodiments, the infusiondevice 102 and/or the sensing arrangement 104 may be configured totransmit data to the CCD 106 and/or the computer 108 for display orprocessing of the data by the CCD 106 and/or the computer 108.

In some embodiments, the CCD 106 and/or the computer 108 may provideinformation to the user that facilitates the user's subsequent use ofthe infusion device 102. For example, the CCD 106 may provideinformation to the user to allow the user to determine the rate or doseof medication to be administered into the user's body. In otherembodiments, the CCD 106 may provide information to the infusion device102 to autonomously control the rate or dose of medication administeredinto the body of the user. In some embodiments, the sensing arrangement104 may be integrated into the CCD 106. Such embodiments may allow theuser to monitor a condition by providing, for example, a sample of hisor her blood to the sensing arrangement 104 to assess his or hercondition. In some embodiments, the sensing arrangement 104 and the CCD106 may be for determining glucose levels in the blood and/or bodyfluids of the user without the use of, or necessity of, a wire or cableconnection between the infusion device 102 and the sensing arrangement104 and/or the CCD 106.

In some embodiments, the sensing arrangement 104 and/or the infusiondevice 102 may utilize a closed-loop system for delivering fluid to theuser. Examples of sensing devices and/or infusion pumps utilizingclosed-loop systems may be found at, but are not limited to, thefollowing U.S. Pat. Nos. 6,088,608, 6,119,028, 6,589,229, 6,740,072,6,827,702, and 7,323,142, all of which are incorporated herein byreference in their entirety. In such embodiments, the sensingarrangement 104 is configured to sense a condition of the user, such as,blood glucose level or the like. The infusion device 102 may beconfigured to deliver fluid in response to the condition sensed by thesensing arrangement 104. In turn, the sensing arrangement 104 maycontinue to sense a new condition of the user, allowing the infusiondevice 102 to deliver fluid continuously in response to the newcondition sensed by the sensing arrangement 104 indefinitely. In someembodiments, the sensing arrangement 104 and/or the infusion device 102may be configured to utilize the closed-loop system only for a portionof the day, for example only when the user is asleep or awake.

Referring now to FIGS. 2-3, in an exemplary embodiment, the infusiondevice 102 in the infusion system 100 of FIG. 1 is realized as fluidinfusion device 200. FIGS. 2-3 depict perspective views of the fluidinfusion device 200, which includes a durable housing 202 and a baseplate 204. While FIG. 2 depicts the durable housing 202 and the baseplate 204 as being coupled together, in practice, the durable housing202 and/or the base plate 204 may include features, structures, orelements to facilitate removable coupling (e.g., pawls, latches, rails,slots, keyways, buttons, or the like) and accommodate aremovable/replaceable fluid reservoir 206. As illustrated in FIG. 3, inexemplary embodiments, the fluid reservoir 206 mates with, and isreceived by, the durable housing 202. In alternate embodiments, thefluid reservoir 206 mates with, and is received by, the base plate 204.

In exemplary embodiments, the base plate 204 is temporarily adhered tothe skin of the user, as illustrated in FIG. 1 using, for example, anadhesive layer of material. After the base plate is affixed to the skinof the user, a suitably configured insertion device or apparatus may beused to insert a fluid delivery needle or cannula 208 into the body ofthe user. The cannula 208 functions as one part of the fluid deliverypath associated with the fluid infusion device 200. The durable housing202 receives the fluid reservoir 206 and retains the fluid reservoir 206in a substantially fixed position and orientation while the durablehousing 202 and the base plate 204 are coupled. The durable housing 202is configured to secure to the base plate 204 in a specified orientationto engage the fluid reservoir 206 with a reservoir port receptacleformed in the durable housing 202. In particular embodiments, the fluidinfusion device 200 includes certain features to orient, align, andposition the durable housing 202 relative to the base plate 204 suchthat when the two components are coupled together, the fluid reservoir206 is urged into the reservoir port receptacle to engage a sealingassembly and establish a fluid seal, as described in more detail below.

In exemplary embodiments, the fluid reservoir 206 includes a fluiddelivery port 210 that cooperates with the reservoir port receptacle.The fluid delivery port 210 may include a pierceable septum if the fluidreservoir 206 is a prefilled unit. Alternatively, the fluid deliveryport 210 may include a vented opening to accommodate filling of thefluid reservoir 206 by the patient, a doctor, a caregiver, or the like.The fluid delivery port 210 has an interior 211 defined therein that isshaped, sized, and otherwise configured to receive a sealing elementwhen the fluid reservoir 206 is engaged with the reservoir portreceptacle. The sealing element forms part of a sealing assembly for thefluid infusion device 200. In this regard, the sealing assembly includesone or more sealing elements and/or fluid delivery needles configured toestablish fluid communication from the interior of the reservoir 206 tothe cannula 208 via the fluid delivery port 210 and a mounting cap 212,and thereby establish a fluid delivery path from the reservoir 206 tothe user via the cannula 208.

As illustrated in FIG. 3, the fluid reservoir 206 includes a reservoirbarrel 220 that contains the fluid and a stopper 222 (or plunger)positioned to push fluid from inside the barrel 220 of the reservoir 206along the fluid path through the cannula 208 to the user. The stopper222 includes a shaft 224 having exposed teeth 225 that are configured tomechanically couple or otherwise engage the shaft 224 of the stopper 222with a drive system 230 contained in the durable housing 202. Inexemplary embodiments, the drive system 230 includes a motor 232 havinga rotor that is mechanically coupled to a gear assembly that translatesrotation of the rotor of the motor 232 to translational displacement thestopper 222 in the direction 250 of the fluid delivery port 210. In thisregard, in exemplary embodiments, the rotor of the motor 232 ismechanically coupled to a rotary shaft, which, in turn, engages a gearassembly 236 that includes a pinion gear 238 having exposed teeth 239configured to mate with or otherwise engage the teeth 225 of the shaft224. The rotary shaft translates rotation (or displacement) of the rotorof the motor 232 into a corresponding rotation (or displacement) of thegear assembly 236 such that the exposed teeth 239 of the pinion gear 238to apply force to the exposed teeth 225 of the shaft 224 of the stopper222 in the direction 250 of the fluid delivery port 210 to therebydisplace the stopper 222 in the direction 250 of the fluid delivery port210 and dispense, expel, or otherwise deliver fluid from the barrel 220of the reservoir 206 to the user via the fluid delivery path provided bythe cannula 208. In exemplary embodiments, the motor 232 is realized asa DC motor, such as a stepper motor or brushless DC motor capable ofprecisely controlling the amount of displacement of the stopper 222during operation of the infusion device 200, as described in greaterdetail below.

Referring now to FIGS. 4-6, in accordance with one or more embodiments,the drive system 230 in the durable housing 202 of the fluid infusiondevice 200 is realized as drive system 400. In this regard, FIG. 5depicts a cross-sectional perspective view of the motor 402 of the drivesystem 400 and FIG. 6 depicts a perspective view of the drive system 400engaged with a shaft 624, such as the shaft 224 coupled to the stopper222 of a reservoir 206 in the fluid infusion device 200. Various aspectsof the motor drive system 400 may be similar to those described in U.S.patent application Ser. No. 13/049,803. The illustrated drive system 400includes a motor 402 (e.g., motor 232) and a gear assembly 406 (e.g.,gear assembly 236). As described above, the drive system 400 includes arotary shaft 404 that is mechanically coupled to the rotor 501 of themotor 402. The rotary shaft 404 is mechanically coupled to a first gear408 of the gear assembly 406. In the illustrated embodiment, the firstgear 408 is coaxial and/or concentric to and disposed about the rotaryshaft 404, and the first gear 408 is affixed to or otherwise integratedwith the rotary shaft 404 such that the first gear 408 and the rotaryshaft 404 rotate in unison. The gear assembly 406 includes a second gear610 (e.g., pinion gear 238) having teeth 612 that are configured to matewith the exposed teeth 625 on a shaft 624 (e.g., teeth 225 on the shaft224 of the stopper 222), such that rotation or displacement of thesecond gear 610 produces a corresponding linear displacement of theshaft 624, as described above. In exemplary embodiments, the gearassembly 406 includes various additional gears and other drive traincomponents (e.g., screws, cams, ratchets, jacks, pulleys, pawls, clamps,nuts, slides, bearings, levers, beams, stoppers, plungers, sliders,brackets, guides, bearings, supports, bellows, caps, diaphragms, bags,heaters, and the like) configured to mechanically couple the gears 408,610 so that rotation (or displacement) of the first gear 408 produces acorresponding rotation (or displacement) of the second gear 610. Thus,during operation of the fluid infusion device 200, when the motor 402 isoperated to rotate the rotor 501 of the motor 402, the rotary shaft 404rotates in unison with the rotor 501 to cause a corresponding rotationof the first gear 408, which, in turn, actuates the gears of the gearassembly 406 to produce a corresponding rotation or displacement of thesecond gear 610, which, in turn, displaces the shaft 624 (e.g., shaft224) in a linear direction (e.g., direction 250).

Referring to FIG. 5, in an exemplary embodiment, a sensor 500 isconfigured to measure, sense, or otherwise detect rotation (ordisplacement) of the rotary shaft 404 and/or the rotor 501 of the motor402. In exemplary embodiments, the rotary shaft 404 includes adetectable feature that is measurable or otherwise detectable by thesensor 500. In the illustrated embodiment, a rotary member (or wheel)502 is provided on the rotary shaft 404 and includes a plurality ofprotruding features (or arms) 504 that are measurable or otherwisedetectable by the sensor 500. In the illustrated embodiment, the wheel502 is coaxial and/or concentric to and disposed about the rotary shaft404, and the wheel 502 is affixed to or otherwise integrated with therotary shaft 404 such that the wheel 502 and the rotary shaft 404 rotatein unison. In this manner, rotation (or displacement) of the wheel 502corresponds to the displacement of the rotary shaft 404 and/or the rotor501 of the motor 402.

In exemplary embodiments, the sensor 500 is realized as an incrementalposition sensor configured to measure, sense, or otherwise detectincremental rotations of the rotary shaft 404 and/or the rotor 501 ofthe motor 402. For example, in accordance with one or more embodiments,the sensor 500 is realized as a rotary encoder. In alternativeembodiments, the sensor 500 may be realized using any other suitablesensor, such as (but not limited to) a magnetic sensor, optical sensor(or other light detector), tactile sensor, capacitive sensor, inductivesensor, and/or the like. In exemplary embodiments, the incrementalposition sensor 500 may be configured to count or otherwise senseincremental rotations of the motor 402 via the wheel 502, for example,by counting each time a protruding feature 504 passes by the sensor 500.In this regard, when the number of protruding features 504 equals orotherwise corresponds to the number of discrete motor steps of thestepper motor 402, the incremental position sensor 500 counts orotherwise senses the number of motor steps traversed by the rotary shaft404 and/or rotor of the motor 402. In some embodiments, the sensor 500includes an emitter 510 and a detector 512 disposed on opposite sides ofthe wheel 502 such that at least a portion of the protruding features504 passes between the emitter 510 and the detector 512 as the wheel 502rotates. In this regard, the sensor 500 may detect or otherwise counteach instance when a protruding feature 504 interrupts a transmissionfrom the emitter 510 to the detector 512. Alternatively, the sensor 500may detect or otherwise count each instance a transmission from theemitter 510 to the detector 512 is uninterrupted or otherwise completed(e.g., via gaps between protruding features 504).

FIG. 7 depicts an exemplary embodiment of a motor control system 700suitable for use in a fluid infusion device in an infusion system, suchas infusion device 200 or infusion device 102 in the infusion system100. The illustrated motor control system 700 includes, withoutlimitation, a motor control module 702, a pulse-width modulation (PWM)module 704, a motor driver module 706, a motor 708 (e.g., motor 232,402), and a position sensor 710 (e.g., sensor 500). In exemplaryembodiments, the motor control system 700 is suitably configured tooperate the motor 708 to provide a desired amount of fluid to a user inresponse to a dosage command indicative of the desired amount of fluidto be delivered that is received from a pump control module 720, asdescribed in greater detail below. In this regard, the pump controlmodule 720 generally represents the electronics and other components ofthe infusion system that process sensor data (e.g., from sensingarrangement 104) pertaining to a condition of the user and controloperation of the fluid infusion device according to a desired infusiondelivery program in a manner that is influenced by sensor data measuredby and/or received from the sensing arrangement 104 or otherwisedictated by the user. In practice, the features and/or functionality ofthe pump control module 720 may be implemented by control electronicslocated in the fluid infusion device 102, 200, the CCD 106 and/or thecomputer 108. It should be understood that FIG. 7 is a simplifiedrepresentation of the system 700 for purposes of explanation and is notintended to limit the subject matter described herein in any way. Forexample, in practice, the features and/or functionality of the motorcontrol module 702 may implemented by or otherwise integrated into thepump control module 720, or vice versa.

In the illustrated embodiment, the PWM module 704 generally representsthe combination of circuitry, hardware and/or other electricalcomponents configured to generate a pulse-width modulated voltage outputapplied to the motor 708 via the motor driver module 706. In anexemplary embodiment, the PWM module 704 is coupled to an energy source730, such as a battery housed within the infusion device 200 (e.g., inthe housing 202), to receive a supply voltage. Based on a duty cyclesetting for the PWM module 704, the PWM module 704 generates orotherwise produces a pulse-width modulated voltage output thatoscillates between the supply voltage provided by the energy source 730and a ground (or reference) voltage over a time interval (e.g., the PWMperiod), wherein the pulse-width modulated voltage output is equal tothe supply voltage for a percentage of the time interval correspondingto the duty cycle setting. For example, if the supply voltage providedby the energy source 730 is equal to five volts and the duty cyclesetting is equal to 30%, then the pulse-width modulated voltage outputgenerated by the PWM module 704 may be a square wave having a magnitudeequal to five volts for 30% of the time interval and zero volts for theremaining 70% of the time interval. In this regard, the duty cyclesetting corresponds to the width of a portion of the square wave (e.g.,the portion corresponding the supply voltage), and accordingly, the dutycycle setting may alternatively be referred to herein as the PWM widthsetting. In an exemplary embodiment, the frequency of the pulse-widthmodulated voltage output (e.g., the inverse of the PWM period) isgreater than the frequency of the motor driver module 706, as describedin greater detail below, and the frequency of the pulse-width modulatedvoltage output is typically greater than the electrical time constant ofthe motor coils. As described in greater detail below, in exemplaryembodiments, the PWM module 704 is coupled to the motor control module702 which is configured to adjust, modify, or otherwise control the dutycycle setting of the PWM module 704.

In an exemplary embodiment, the motor 708 is a stepper motor orbrushless DC motor having a toothed rotor and a number of sets ofwindings, wherein the number of teeth on the rotor along with the numberof winding sets and the physical arrangement of the winding sets withrespect to the rotor teeth provides a finite number of motor stepswithin a revolution of the rotor. In this regard, as used herein, a“motor step” or any variant thereof should be understood as referring toan incremental rotation of the rotor of the motor 708 that is dictatedby the number of teeth of the rotor along with the number and/orarrangement of the winding sets. As described above, in an exemplaryinfusion pump embodiment, the rotor of the motor 708 is mechanicallycoupled to a gear assembly 740 (e.g., gear assembly 236, 406) thatincludes the gears or other drive train components of the infusiondevice, such that an incremental rotation of the rotor by one motor stepproduces a corresponding amount of displacement of a stopper 750 (e.g.,stopper 222) into a reservoir (e.g., reservoir 206) to deliver fluid(e.g., insulin) to the body of a user.

The motor driver module 706 generally represents the combination ofcircuitry, hardware and/or other electrical components configured tosequentially apply a voltage provided at a supply voltage input of themotor driver module 706 to one or more sets of windings of the motor 708in a particular order to produce a corresponding number of commandedmotor steps of rotation by the motor 708. In the illustrated embodiment,the supply voltage input of the motor driver module 706 is coupled tothe output of the PWM module 704, such that the motor driver module 706provides the pulse-width modulated voltage from the PWM module 704 tothe one or more sets of windings of the motor 708 in a particular orderunder control of the motor control module 702. In this regard, in someembodiments, the motor driver module 706 is coupled to the motor controlmodule 702 to receive a commanded number of motor steps from the motorcontrol module 702, wherein in response to the commanded number of motorsteps, the motor driver module 706 sequentially applies the pulse-widthmodulated voltage from the PWM module 704 to the sets of windings of themotor 708 in the appropriate order to produce the commanded number ofmotor steps. In other embodiments, the motor control module 702 mayoperate the switches and/or other circuitry of the motor driver module706 to produce the commanded number of motor steps. The frequency atwhich the motor driver module 706 is operated (e.g., the frequency atwhich the pulse-width modulated voltage is changed from being applied toone winding set to another winding set) is less than the frequency ofthe pulse-width modulated voltage output from the PWM module 704, suchthat the pulse-width modulated voltage output oscillates between thesupply voltage and the ground voltage multiple times over the timeperiod (e.g., the inverse of the motor driver frequency) during whichthe pulse-width modulated voltage output is applied to a particular setof windings of the motor 708.

In an exemplary embodiment, the position sensor 710 is realized as anincremental position sensor, such as a rotary encoder, that isconfigured to sense, measure, or otherwise detect an incrementalrotation of the rotor of the motor 708, in a similar manner as describedabove in the context of FIG. 5. In exemplary embodiments, the resolutionof the position sensor 710 is greater than or equal to the resolution ofthe motor 708, that is, the number of discrete incremental rotationsmeasurable by the position sensor 710 over one revolution of the rotorof the motor 708 (e.g., the number of detectable features 504) isgreater than or equal to the number of discrete motor steps over onerevolution of the rotor of the motor 708. The output of the positionsensor 710 is coupled to the motor control module 702 to provide dynamicclosed-loop PWM control of the motor 708, as described in greater detailbelow.

Still referring to FIG. 7, the motor control module 702 generallyrepresents the hardware, software, firmware and/or combination thereofthat is configured to receive or otherwise obtain a commanded dosagefrom the pump control module 720, convert the commanded dosage to acommanded number of motor steps, and command, signal, or otherwiseoperate the motor driver module 706 to cause the motor 708 to producethe commanded number of motor steps. As described in greater detailbelow in the context of FIG. 8, in exemplary embodiments, the motorcontrol module 702 determines an expected number of incrementalrotations of the motor 708 based on the commanded number of motor steps,obtains the measured number of incremental rotations of the rotor of themotor 708 from the position sensor 710, and based on differences betweenthe measured number and the expected number, modifies or otherwiseadjusts the PWM width setting of the PWM module 704 to achieve thecommanded number of motor steps. Depending on the embodiment, the motorcontrol module 702 may be implemented or realized with a general purposeprocessor, a microprocessor, a controller, a microcontroller, a statemachine, a content addressable memory, an application specificintegrated circuit, a field programmable gate array, any suitableprogrammable logic device, discrete gate or transistor logic, discretehardware components, or any combination thereof, designed to perform thefunctions described herein. Furthermore, the steps of a method oralgorithm described in connection with the embodiments disclosed hereinmay be embodied directly in hardware, in firmware, in a software moduleexecuted by the motor control module 702, or in any practicalcombination thereof. In exemplary embodiments, the motor control module702 includes or otherwise accesses a memory, including any sort ofrandom access memory (RAM), read only memory (ROM), flash memory,registers, hard disks, removable disks, magnetic or optical massstorage, or any other short or long term storage media or othernon-transitory computer-readable medium, which is capable of storingprogramming instructions for execution by the motor control module 702.The computer-executable programming instructions, when read and executedby the motor control module 702, cause the motor control module 702 toperform the tasks, operations, functions, and processes described ingreater detail below.

FIG. 8 depicts an exemplary motor control process 800 suitable forimplementation by a motor control system 700 to deliver fluid to a userusing dynamic closed-loop PWM control. The various tasks performed inconnection with the motor control process 800 may be performed bysoftware, hardware, firmware, or any combination thereof. Forillustrative purposes, the following description refers to elementsmentioned above in connection with FIG. 7. In practice, portions of themotor control process 800 may be performed by different elements of themotor control system 700, such as, for example, the motor control module702, the PWM module 704, the motor driver module 706, the motor 708and/or the position sensor 710. It should be appreciated that the motorcontrol process 800 may include any number of additional or alternativetasks, the tasks need not be performed in the illustrated order and/orthe tasks may be performed concurrently, and/or the motor controlprocess 800 may be incorporated into a more comprehensive procedure orprocess having additional functionality not described in detail herein.Moreover, one or more of the tasks shown and described in the context ofFIG. 8 could be omitted from a practical embodiment of the motor controlprocess 800 as long as the intended overall functionality remainsintact.

Referring to FIG. 8, and with continued reference to FIG. 7, the motorcontrol process 800 begins by determining an initial duty cycle settingand configuring the PWM module to implement that initial duty setting(task 802). In an exemplary embodiment, the initial duty cycle settingis a minimum duty cycle capable of rotating the rotor of the motor 708by one motor step. In this regard, in some embodiments, the motorcontrol module 702 may calibrate or otherwise determine the initial dutycycle setting upon initialization of the infusion pump. For example,upon powering on the infusion pump and/or a reservoir being insertedinto the infusion pump, the motor control module 702 may perform acalibration routine by initially setting the duty cycle setting of thePWM module 704 to a minimum value capable of being implemented by thePWM module 704, signaling or otherwise commanding the motor drivermodule 706 to provide one motor step of rotation, and monitoring theoutput of the position sensor 710 to determine if the rotor of the motor708 rotated by a motor step. If the motor 708 did not rotate by a motorstep, the motor control module 702 incrementally increases the dutycycle setting of the PWM module 704, repeats the steps of commanding themotor driver module 706 to provide one motor step of rotation andmonitoring the output of the position sensor 710 until determining thatthe rotor of the motor 708 has rotated by a motor step. Once the motor708 rotates by one motor step, the motor control module 702 maintainsthe duty cycle setting of the PWM module 704 at the duty cycle thatresulted in a motor step of rotation. In other embodiments, the motorcontrol system 700 may be pre-calibrated with an initial PWM widthsetting that is stored or otherwise maintained by the motor controlmodule 702 for configuring the PWM module 704 upon initialization of theinfusion pump and/or the motor control process 800. For example, if thePWM module 704 has a minimum duty cycle setting (e.g., 20%), the motorcontrol module 702 may default the duty cycle setting of the PWM module704 to the minimum duty cycle capable of being implemented by the PWMmodule 704.

After configuring the PWM module with an initial duty cycle setting, themotor control process 800 continues by receiving or otherwise obtaininga motor command corresponding to a desired displacement of a stopper ora desired amount of rotation to be provided by the motor (task 804). Forexample, the pump control module 720 may determine or otherwise receive(e.g., from the CCD 106 and/or the computer 108) a dose (or bolus) offluid to be provided to the user based on a sensed condition of the user(e.g., a blood glucose level). In some embodiments, the pump controlmodule 720 converts the amount of fluid to be provided to the user intoa commanded displacement of the stopper 750, converts the commandeddisplacement of the stopper 750 to a corresponding number of motorsteps, and provides that commanded number of motor steps to the motorcontrol module 702. In other embodiments, the pump control module 720provides the amount of fluid to be provided to the user to the motorcontrol module 702, wherein the motor control module 702 converts thecommanded dosage into a corresponding number of commanded motor stepsbased on the amount of displacement of the stopper 750 corresponding tothat amount of fluid.

In accordance with one or more embodiments, the motor control process800 continues by dividing or otherwise converting the number ofcommanded motor steps into a number of step command blocks (task 806).In this regard, in some embodiments, the step command blocks have afixed number of steps, wherein when the number of commanded motor stepsis greater than the fixed number of steps, the motor step command isbroken up into smaller command blocks to decrease the response time whenthe motor 708 fails to achieve a commanded number of motor steps, asdescribed in greater detail below. For example, if the total number ofcommanded motor steps corresponding to the desired dosage is equal toone hundred motor steps, the motor control module 702 may divide thecommanded motor steps into ten different step command blocks of tenmotor steps.

In an exemplary embodiment, the motor control process 800 continues bycommanding or otherwise signaling the motor driver module to operate themotor in a manner intended to produce the commanded number of motorsteps in a step command block with the current PWM width setting (task808). In this regard, the motor control module 702 signals, commands,instructs, or otherwise operates the motor driver module 706 tosequentially apply the pulse-width modulated voltage output of the PWMmodule 704 to the various sets of windings of the motor 708 in theappropriate order to cause rotor of the motor 708 rotate by the numberof motor steps in the step command block. For example, the motor controlmodule 702 may command the motor driver module 706 to implement tenmotor steps, wherein in response, the motor driver module 706 changeswhich set of windings of the motor 708 that the pulse-width modulatedvoltage output of the PWM module 704 is applied to ten different timesin an order or sequence intended to produce ten motor steps of rotationfrom the current position of the rotor. As described above, the motordriver module 706 applies the pulse-width modulated voltage output fromthe PWM module 704 to a first set of windings of the motor 708 for afirst time period substantially equal to the inverse of the motor drivermodule frequency to produce a first motor step of rotation from acurrent position of the rotor of the motor 708, then applies thepulse-width modulated voltage output from the PWM module 704 to a secondset of windings of the motor 708 for another time period substantiallyequal to the inverse of the motor driver module frequency to produceanother motor step of rotation from the updated position of the rotor,and so on until reaching the commanded number of steps in the stepcommand block.

In an exemplary embodiment, the motor control process 800 continues bycalculating or otherwise determining an expected displacement of therotor of the motor or another element mechanically coupled to the rotor(e.g., the stopper) after execution of the step command block based onthe commanded number of motor steps in the step command block (task810). The expected displacement is the amount by which the rotor of themotor 708 is expected to have rotated when the commanded rotation isachieved. To put it another way, the expected displacement correspondsto the amount of displacement of the rotor of the motor 708 that isexpected to be measured or detected by the position sensor 710 inresponse to the commanded rotation. For example, when the positionsensor 710 is a rotary encoder or another incremental position sensor,the motor control module 702 calculates or otherwise determines a numberof rotational increments that would be expected to be measured orotherwise detected by the position sensor 710 after execution of thestep command block based on the number of motor steps in the stepcommand block and the relationship between the resolution of theposition sensor 710 with respect to the resolution of the motor 708. Inthis regard, the expected number of measured rotational increments afterexecution of a step command block, n_(E), is equal to

${n_{C} \times \frac{r_{P}}{r_{M}}},$

where n_(C) is the number of motor steps in the step command block,r_(P) is the number of discrete rotational increments detectable by theposition sensor 710 over a revolution of the rotor of the motor 708, andr_(M) is the number of discrete motor steps (or discrete rotationalincrements) for the rotor of the motor 708 over one revolution. Thus,when the number of discrete rotational increments detectable by theposition sensor 710 is equal to the number of possible motor steps overa revolution of the motor 708, the expected number of measuredrotational increments is equal to the commanded number of motor steps inthe step command block.

Still referring to FIG. 8, the motor control process 800 continues byobtaining a measured displacement of the rotor of the motor or anotherelement mechanically coupled to the rotor (e.g., the stopper) afterexecuting the step command block (task 812). In this regard, aftercommanding the motor driver module 706, the motor control module 702waits for an amount of time required to implement the step command blockbefore obtaining the position of the rotor of the motor 708 from theposition sensor 710. For example, the motor control module 702 maycalculate the amount of time required by the motor driver module 706 toimplement the step command block by multiplying the number of motorsteps in the step command block by the inverse of the motor driverfrequency (e.g., the amount of time a pulse-width modulated voltage isapplied to produce an individual motor step). When the position sensor710 is a rotary encoder or another incremental position sensor, themotor control module 702 obtains an initial position of the rotor of themotor 708 from the position sensor 710 (e.g., an initial encoder count)prior to commanding the motor driver module 706 to implement a stepcommand block, obtains a subsequent position of the rotor of the motor708 from the position sensor 710 (e.g., a subsequent encoder count)after commanding the motor driver module 706 to implement the stepcommand block, and calculates or otherwise determines the measurednumber of rotational increments as a difference between positionsobtained from the position sensor 710 (e.g., by subtracting the initialencoder count from the subsequent encoder count).

In exemplary embodiments, the motor control process 800 identifies orotherwise determines whether the motor has achieved the commanded amountof rotation (task 814). In some embodiments, the motor control module702 determines that the motor has failed to achieve the commanded amountof rotation when a difference between the expected displacement and themeasured displacement exceeds a threshold value. The threshold value isindicative of the number of motor steps of rotation actually achieved bythe motor 708 being less than the commanded number of motor steps in thestep command block. For example, when the number of discrete rotationalincrements detectable by the position sensor 710 is equal to the numberof possible motor steps over a revolution of the motor 708, thethreshold value may be equal to zero. Thus, in such an embodiment, whenthe expected number of measured rotational increments is greater thanthe measured number of rotational increments, the motor control module702 identifies that the motor 708 did not achieve the commanded numberof motor steps. In other embodiments where the resolution of theposition sensor 710 is greater than the resolution of the stepper motor,the threshold value is chosen to be greater than zero to account fordifferences between the expected number and the measured number ofrotational increments that could be attributable to noise, vibration, orother physical variations and/or misalignment between the positionsensor 710 and the rotor teeth and/or positions of the windings sets ofthe motor 708. For example, if the number of discrete rotationalincrements detectable by the position sensor 710 over a revolution ofthe motor 708 is equal to five times the number of motor steps over onerevolution, the threshold value may be chosen to be equal to two, suchthat when the expected number of measured rotational increments isgreater than the measured number of rotational increments by more thantwo, the motor control module 702 identifies that the motor 708 did notachieve the commanded number of motor steps.

In response to identifying that the motor did not achieve the commandedrotation, the motor control process 800 continues by calculating orotherwise determining an amount by which the duty cycle of the PWMmodule should be increased and increasing or otherwise adjusting theduty cycle setting for the PWM module (tasks 816, 818). In someembodiments, the motor control module 702 calculates an amount by whichto increase the PWM width setting based on the difference between theexpected displacement and the measured displacement of the motor 708.For example, the motor control module 702 may increase the duty cyclesetting of the PWM module 704 by a first amount if the differencebetween the expected displacement and the measured displacement of themotor 708 corresponds to one missed motor step, increase the duty cyclesetting by a greater amount if the difference between the expecteddisplacement and the measured displacement of the motor 708 correspondsto two missed motor steps, and so on. In this regard, the amount ofincrease to the PWM width setting may correspond to the differencebetween the expected displacement and the measured displacement of themotor 708. In other embodiments, the motor control module 702 mayincrease the duty cycle setting by a fixed amount (e.g., a fixedpercentage or a percentage of the current duty cycle) regardless of thedifference between the expected displacement and the measureddisplacement of the motor 708. For example, the motor control module 702may increase the duty cycle setting of the PWM module 704 by 5% eachtime the motor achieves a number of motor steps that was less than thecommanded number of motor steps. After the motor control module 702identifies or otherwise determines the amount by which to increase thePWM width setting for the PWM module 704, the motor control module 702determines an updated PWM width setting (e.g., a sum of the previousduty cycle and the amount of increase) for the PWM module 704 andconfigures the PWM module 704 to implement the updated PWM widthsetting. For example, if the initial PWM width setting corresponds to a30% duty cycle and the motor control module 702 determines that the PWMwidth setting should be increased by 5% based on the difference betweenthe expected number of measured rotational increments and the actualmeasured number of rotational increments, the motor control module 702configures or otherwise instructs the PWM module 704 to implement a 35%duty cycle.

In an exemplary embodiment, the motor control process 800 determines thenumber of missed motor steps based on the measured displacement andmodifies the number of motor steps in a subsequent step command block tocompensate for the number of missed motor steps (tasks 820, 822). Inaccordance with one or more embodiments, the motor control module 702adds a number of motor steps that corresponds to the difference betweenthe expected displacement and the measured displacement to the commandednumber of motor steps in the next step command block. In someembodiments, the motor control module 702 may calculate or otherwisedetermine the actual number of motor steps produced by the motor 708based on the measured displacement of the rotor and determine the missedmotor steps as the difference between the commanded number of motorsteps and the actual number of motor steps. For example, when theposition sensor 710 is a rotary encoder or another incremental positionsensor, the motor control module 702 may convert the measured number ofincremental rotations to a number of motor steps and subtract thatnumber of motor steps from the commanded number of motor steps to obtainthe missed motor steps. The measured number of incremental rotations maybe converted motor steps by multiplying the measured number incrementalrotations by

$\frac{r_{M}}{r_{P}},$

where r_(P) is the number of discrete rotational increments perrevolution detectable by the position sensor 710 and r_(M) is the numberof motor steps per revolution. Alternatively, the motor control module702 may determine the missed motor steps by converting the differencebetween the expected number of measured incremental rotations and theactual measured number of incremental rotations to a number of motorsteps (e.g., by multiplying the difference by

$\left. \frac{r_{M}}{r_{P}} \right).$

After determining a modified step command block that compensates formissed motor steps, the motor control process 800 continues bycommanding or otherwise signaling the motor driver module to operate themotor in a manner intended to produce the number of motor steps in themodified step command block with the updated PWM width setting (task808). For example, as described above, if the preceding step commandblock of ten motor steps resulted in two missed motor steps whenexecuted at a PWM width setting of 30%, and the motor control module 702determines that the PWM width setting should be increased to 35%, themotor control module 702 configures the PWM module 704 to implement a35% duty cycle while commanding the motor driver module 706 to execute astep command block of twelve motor steps to compensate for the missedmotor steps of the previous step command block. While the motor drivermodule 706 is implementing the modified step command block, thepulse-width modulated voltage oscillates between the supply voltage for35% of the PWM period and the ground voltage for 65% of the PWM period,rather than oscillating between the supply voltage for 30% of the PWMperiod and the ground voltage for 70% of the PWM period as was doneduring the preceding step command block. As described above, the motorcontrol module 702 determines an expected displacement of the rotor ofthe motor 708 after execution of the modified step command block,obtains a measured displacement of the rotor of the motor 708 afterexecution of the modified step command block, and determines whether themotor 708 achieved the commanded number of motor steps based on themeasured displacement (tasks 810, 812, 814). If the motor 708 did notachieve the number of motor steps commanded during the modified stepcommand block with the updated PWM width setting, the motor controlmodule 702 further increases the PWM width setting for the PWM moduleand modifies a subsequent step command block to compensate for themissed motor steps during the modified step command block (tasks 816,818, 820, 822), as described above.

Still referring to FIG. 8, in response to determining that the motorachieved the commanded amount of rotation (e.g., the commanded number ofmotor steps in a step command block), the motor control process 800continues by determining whether the duty cycle for the PWM moduleshould be decreased (task 824). In this regard, the duty cycle settingis decreased after the duty cycle has remained unchanged (or constant)and achieved the commanded number of motor steps over a particularamount of time and/or achieved a particular number of commanded motorsteps. In some embodiments, the motor control module 702 may store orotherwise maintain a timestamp corresponding to the most recent increasein the PWM width setting and determine that the PWM width setting shouldbe decreased when more than a threshold amount of time has elapsed sincethe most recent increase in the PWM width setting. For example, thethreshold amount of time may be twelve hours, wherein the motor controlmodule 702 obtains a current time and determines the PWM width settingshould be decreased when the current time is more than twelve hoursafter the most recent increase in the duty cycle implemented by the PWMmodule 704. In other embodiments, the motor control module 702 may countor otherwise monitor a cumulative number of motor steps executed by themotor 708 since the most recent increase in the PWM width setting anddetermine that the PWM width setting should be decreased when thecumulative number of motor steps executed by the motor 708 since themost recent increase in the duty cycle exceeds a threshold number ofmotor steps. For example, if the threshold number of motor steps is onethousand motor steps, the motor control module 702 determines the PWMwidth setting should be decreased when the motor 708 successfullycompletes one thousand motor steps with a constant duty cycle.

In response to determining the PWM width setting should be decreased,the motor control process 800 continues by decreasing the duty cyclesetting for the PWM module (task 826). In some embodiments, the motorcontrol module 702 may decrease the PWM width setting of the PWM module704 by a fixed amount (e.g., a fixed percentage or a certain percentageof the current duty cycle). In other embodiments, the motor controlmodule 702 may store a previous duty cycle prior to increasing the dutycycle setting, wherein the motor control module 702 decreases the PWMwidth setting to that previous duty cycle. For example, if the PWM widthsetting was at a 30% duty cycle prior to increasing to 35%, and themotor 708 has achieved the commanded number of motor steps over aparticular amount of time and/or achieved a particular number ofcommanded motor steps with the 35% duty cycle, the motor control module702 may revert the PWM width setting of the PWM module 704 back to the30% duty cycle for subsequent step command blocks.

In an exemplary embodiment, the motor control process 800 continues bydetermining whether the entire motor command has been completed (task828). In this regard, the motor control module 702 verifies or otherwisedetermines whether the rotor of the motor 708 has rotated by the totalnumber of motor steps corresponding to the dose (or bolus) of fluid tobe provided to the user. When the motor 708 has not achieved the totalnumber of motor steps corresponding to the desired dosage, the motorcontrol module 702 continues operating the PWM module 704 and the motordriver module 706 until the motor 708 achieves the desired number ofmotor steps. For example, if not all of the step command blockscorresponding to the motor command have been executed, the motor controlmodule 702 commands or otherwise operates the motor driver module 706 inaccordance with the next step command block (task 808), as describedabove. Once the motor control module 702 determines that the motor 708has achieved the desired number of motor steps to provide the desireddose of fluid to the user, in an exemplary embodiment, the motor controlmodule 702 turns off the motor driver module 706 until receiving asubsequent motor command.

In response to a subsequent motor command from the pump control module720 (task 804), the motor control module 702 repeats the steps ofoperating the motor driver module 706 and dynamically increasing and/ordecreasing the PWM width setting of the PWM module 704 based on whetheror not the motor 708 achieves a commanded number of motor steps, asdescribed above. The motor 708 consumes power from the energy source 730only during the times when the pulse-width modulated voltage output ofthe PWM module 704 is equal to the supply voltage provided by the energysource 730, and thus, by dynamically adjusting the PWM width setting,the power consumed by the motor 708 to achieve a desired number of motorsteps may be reduced by keeping the duty cycle setting for the PWMmodule 704 relatively low and increasing the duty cycle on an as neededbasis. As described in greater detail below, in exemplary embodiments,the motor control module 702 monitors the duty cycles provided by thePWM module 704 during operation of the motor control system 700 anddetects or otherwise identifies anomalies in the motor control system700 based on changes to the duty cycle provided by the PWM module 704that are indicative of an anomalous condition, such as, for example, adegradation condition in the motor 708 and/or the gear assembly 740 oran occlusion condition in a fluid path from the fluid reservoir. Inresponse to identifying an anomalous condition, the motor control module702 generates a notification that is provided to the pump control module720 or another supervisory system, which, in turns, notifies the user orinitiates remedial action to address the potential anomaly.

FIG. 9 depicts an exemplary occlusion detection process 900 suitable forimplementation by a motor control system 700 to detect an occlusion in afluid path while delivering fluid to a user using closed-loop dynamicPWM control in accordance with the motor control process 800 of FIG. 8.The various tasks performed in connection with the occlusion detectionprocess 900 may be performed by software, hardware, firmware, or anycombination thereof. For illustrative purposes, the followingdescription refers to elements mentioned above in connection with FIG.7. In practice, portions of the occlusion detection process 900 may beperformed by different elements of the motor control system 700, suchas, for example, the motor control module 702. It should be appreciatedthat the occlusion detection process 900 may include any number ofadditional or alternative tasks, the tasks need not be performed in theillustrated order and/or the tasks may be performed concurrently, and/orthe occlusion detection process 900 may be incorporated into a morecomprehensive procedure or process having additional functionality notdescribed in detail herein. Moreover, one or more of the tasks shown anddescribed in the context of FIG. 9 could be omitted from a practicalembodiment of the occlusion detection process 900 as long as theintended overall functionality remains intact.

In an exemplary embodiment, the occlusion detection process 900characterizes the PWM width settings of the PWM module for an occlusionin the fluid path by determining a reference value for a duty cyclemetric that is indicative of an occlusion in the fluid path (task 902).In this regard, the reference value for the duty cycle metric isrepresentative of the changes to the duty cycle setting of the PWMmodule 704 that are likely to be exhibited by the motor control system700 in response to an occlusion in the fluid delivery path that slows,prevents, or otherwise degrades fluid delivery from the reservoir to auser's body while the motor 708 is operated in accordance with the motorcontrol process 800. In this regard, an occlusion in the fluid pathincreases the force opposing displacement of the stopper 750, which, inturn, will increase the amount of torque required to rotate the rotor ofthe motor 708 by a motor step. Depending on the embodiment, the dutycycle metric may be a rate of change (or derivative) of the PWM widthsetting over a preceding time interval, a moving average of the PWMwidth setting over a preceding time interval, a sequence of PWM widthsettings over a preceding time interval, a threshold PWM width value, amatched filter applied to a sequence of PWM width settings over apreceding time interval, or some other metric representative of anocclusion in the fluid path while operating the motor 708 in accordancewith the motor control process 800.

In one embodiment, the reference value may be determined by creating orotherwise simulating an occlusion in the fluid path and operating themotor 708 in accordance with the motor control process 800 prior toproviding the infusion pump to a user. For example, a component having aknown occlusion (e.g., an occluded reservoir, needle, tubing, or thelike) may be provided to the infusion pump to create a referenceocclusion in the fluid path, and while the reference occlusion exists,the pump control module 720 signals, instructs, or otherwise commandsthe motor control module 702 to perform a calibration routine byoperating the motor 708 for a particular number of motor steps inaccordance with the motor control process 800 and monitoring the PWMwidth settings. In accordance with one embodiment, the number of motorsteps used for the calibration routine is greater than the amount ofmotor steps that are achievable with the reference occlusion in thefluid path. As described above in the context of FIG. 8, the motorcontrol module 702 operates the motor driver module 706 and increasesthe PWM width settings of the PWM module 704 based on the measureddisplacement of the motor 708. For example, the motor control module 702may operate the motor driver module 706 to produce a number of motorsteps (e.g., ten motor steps) with the initial PWM width setting,wherein the resistance provided by the reference occlusion prevents themotor 708 and results in an increase in the PWM width setting. Asdescribed above, the motor control module 702 may calculate the amountof increase for the PWM width setting based on the difference betweenthe expected displacement and the measured displacement of the motor708. Thus, when the reference occlusion substantially preventsdisplacement of the stopper 750 (and thereby prevents rotation of therotor of the motor 708), the PWM width settings determined by the motorcontrol module 702 may increase at a rate (or by an amount) that isunlikely to occur during normal operation. In exemplary embodiments, themotor control module 702 monitors the PWM width settings determinedduring execution of the calibration routine and determines the referencevalue for a duty cycle metric that is indicative of an occlusion basedon those PWM width settings (e.g., the amount of change in the PWM widthsettings during the time interval required to execute the calibrationroutine, the rate of change or derivative of the PWM width settingduring the calibration routine, the sequence of PWM width settings orthe sequence of increases to the PWM width settings during thecalibration routine, a PWM width settings profile identified for theinfusion device using a machine learning algorithm, or the like). Afterthe calibration routine is completed, the reference occlusion is removedbefore the infusion device is provided to the user.

Still referring to FIG. 9, in an exemplary embodiment, the occlusiondetection process 900 continues by operating the motor using dynamic PWMcontrol, obtaining the current PWM width setting for the PWM module, anddetermining an observed value for the duty cycle metric based on thecurrent PWM width setting and/or previously obtained PWM width settings(tasks 904, 906, 908). In this regard, the motor control module 702obtains motor commands from the pump control module 720 and operates themotor 708 using dynamic PWM control in accordance with the motor controlprocess 800 of FIG. 8. In an exemplary embodiment, after each stepcommand block executed by the motor driver module 706, the motor controlmodule 702 obtains the current PWM width setting for the PWM module 704and calculates or otherwise determines an observed value for the dutycycle metric based on the current PWM width setting and/or previouslyobtained PWM width settings. For example, the motor control module 702may determine the observed value as an amount of change or rate ofchange to the PWM width settings over a preceding time interval (e.g.,over a preceding time interval equal to the time interval required toexecute the calibration routine).

In an exemplary embodiment, the occlusion detection process 900continues by identifying, detecting, or otherwise determining whether anocclusion condition exists based on the observed value for the dutycycle metric, and in response to detecting an occlusion condition,generating or otherwise providing a notification of the fluid pathocclusion (tasks 910, 912). In accordance with one or more embodiments,the motor control module 702 compares the observed value for the dutycycle metric with the reference value indicative of a fluid pathocclusion and detects or otherwise identifies an occlusion conditionwhen the observed value meets or exceeds the reference value for theduty cycle metric. For example, if the duty cycle metric is an amount orrate of change to the PWM width setting, the motor control module 702detects an occlusion condition when the amount or rate of change of theobserved PWM width settings is greater than or equal to the amount orrate of change to the PWM width setting during the calibration routine.When the motor control module 702 detects an occlusion condition, themotor control module 702 provides a notification of the fluid pathocclusion to the pump control module 720 or another supervisory systemor module (e.g., the CCD 106 and/or the computer 108). For example, themotor control module 702 may generate an interrupt signal that ishandled by the pump control module 720. In practice, the pump controlmodule 720 and/or the infusion pump may perform other occlusiondetection techniques (e.g., using force sensors or the like), whereinthe pump control module 720 and/or the infusion pump may utilize theocclusion notification generated by the motor control module 702 toverify, confirm, or otherwise augment the other occlusion detectionalgorithms and/or techniques performed by the pump control module 720and/or the infusion pump. In other embodiments, the pump control module720 and/or the infusion pump may utilize the occlusion notificationgenerated by the motor control module 702 as the sole indicia of a fluidpath occlusion when anomalies exist with respect to the other occlusiondetection algorithms and/or techniques supported by the infusion device(e.g., damage to other sensors normally relied on for detecting anocclusion). In the absence of a fluid path occlusion, the loop definedby tasks 904, 906, 908 and 910 repeats during operation of the motor 708in accordance with the motor control process 800 to continuously monitorthe PWM width settings of the PWM module 704 for an occlusion condition.

FIG. 10 depicts an exemplary degradation detection process 1000 suitablefor implementation by a motor control system 700 to detect wear ordegradation in a drive system while delivering fluid to a user usingclosed-loop dynamic PWM control in accordance with the motor controlprocess 800 of FIG. 8. The various tasks performed in connection withthe degradation detection process 1000 may be performed by software,hardware, firmware, or any combination thereof. For illustrativepurposes, the following description refers to elements mentioned abovein connection with FIG. 7. In practice, portions of the degradationdetection process 1000 may be performed by different elements of themotor control system 700, such as, for example, the motor control module702. It should be appreciated that the degradation detection process1000 may include any number of additional or alternative tasks, thetasks need not be performed in the illustrated order and/or the tasksmay be performed concurrently, and/or the degradation detection process1000 may be incorporated into a more comprehensive procedure or processhaving additional functionality not described in detail herein.Moreover, one or more of the tasks shown and described in the context ofFIG. 10 could be omitted from a practical embodiment of the degradationdetection process 1000 as long as the intended overall functionalityremains intact.

In an exemplary embodiment, the degradation detection process 1000characterizes the drive system by determining a reference value for aduty cycle metric based on the PWM width settings of the PWM module thatis indicative of wear or degradation in the drive system (task 1002).The reference value duty cycle metric is representative of the PWM widthsetting(s) that are likely to be exhibited by the motor control system700 while the motor 708 is operated in accordance with the motor controlprocess 800 when the motor 708 and/or the gear assembly 740 haveexperienced sufficient wear or degradation to the point that the motor708 and/or the gear assembly 740 should be inspected for maintenance,repair and/or replacement. In this regard, reference value is indicatesthat the motor 708 and/or the gear assembly 740 should be inspected formaintenance, repair and/or replacement. For example, over time,frictional forces in the drive system may accumulate (e.g., due tolubricant wearing out, rust or other surface effects, damage to themotor and/or one or more of the gears, and the like) and increase theforce that opposes displacement of the gear assembly 740, the stopper750 and/or the motor 708, which, in turn, will increase the amount oftorque required to rotate the rotor of the motor 708 by a motor step.Thus, the reference value may be a duty cycle that is unlikely to beexceeded (e.g., an 80% duty cycle setting) unless the motor 708 and/orgear assembly 740 has degraded. The duty cycle metric may be a thresholdPWM width setting, an average PWM width setting, a sequence of PWM widthsettings, a matched filter applied to a sequence of PWM width settingsover a preceding time interval, or some other metric capable ofindicating degradation to the motor 708 and/or the gear assembly 740.For example, the duty cycle metric may be a moving average of the PWMwidth settings of the PWM module 704 (e.g., an average of the PWM widthsettings over the previous 24 hours). In this regard, the referencevalue may be updated or otherwise determined dynamically duringoperation of the motor control system 700 and/or the infusion device. Insome embodiments, the reference value may be the historical duty cycleaverage over the lifetime of the motor control system 700 and/or theinfusion device. For example, the motor control module 702 maycontinuously obtain the PWM width settings of the PWM module 704 andrecalculate the average PWM width setting over the lifetime of the motorcontrol system 700 and/or the infusion pump (e.g., by averaging PWMwidth settings obtained after each step command block or each motorcommand), as described in greater detail below.

In an exemplary embodiment, the degradation detection process 1000continues by operating the motor using dynamic PWM control, obtaining acurrent duty cycle setting for the PWM module, and determining anobserved value for the duty cycle metric based on the current duty cyclesetting and/or previously obtained duty cycle settings (tasks 1004,1006, 1008). As described above, the motor control module 702 obtainsmotor commands from the pump control module 720 and operates the motor708 using dynamic PWM control in accordance with the motor controlprocess 800 of FIG. 8. In an exemplary embodiment, after each stepcommand block (or alternatively, after each motor command) executed bythe motor driver module 706, the motor control module 702 obtains thecurrent PWM width setting for the PWM module 704 and calculates orotherwise determines an observed value for the duty cycle metric basedon the current PWM width setting and/or previously obtained PWM widthsettings. For example, the motor control module 702 may determine amoving average of the PWM width settings over a preceding time interval(e.g., the previous 24 hours) as the observed value for the duty cyclemetric.

In an exemplary embodiment, the degradation detection process 1000continues by identifying or otherwise determining whether the drivesystem is exhibiting degradation based on the observed value for theduty cycle metric, and in response to detecting a degradation condition,generating or otherwise providing a notification of the degradationcondition (tasks 1010, 1012). The motor control module 702 identifies adegradation condition by comparing the observed value for the duty cyclemetric with the reference value indicative of a degradation conditionand detecting when the observed value meets or exceeds the referencevalue. For example, if the reference value is an 80% duty cycle, themotor control module 702 detects a degradation condition when theobserved value (e.g., the current PWM width setting of the PWM module704 or an average of the current and previous PWM width settings)exceeds 80%. Thus, when the duty cycle metric is a moving average of thePWM width settings over a preceding time interval (e.g., the previous 24hours), the motor control module 702 identifies a degradation conditionwhen the moving average of the PWM width setting exceeds the 80% dutycycle reference value. In some embodiments, the motor control module 702identifies a degradation condition when the observed value exceeds thereference value by some threshold amount, such as a fixed amount (e.g.,a fixed duty cycle percentage) or a fixed percentage of the referencevalue. In this regard, if the reference value is the average PWM widthsetting over the lifetime of the motor control system 700 and/or theinfusion device, the motor control module 702 may identify a degradationcondition when a moving average of the PWM width settings over a shortertime interval exceeds the reference value by more than a thresholdpercentage of the reference value. For example, if the average PWM widthsetting over the lifetime of the motor control system 700 corresponds to50% duty cycle, the motor control module 702 may identify a degradationcondition when an average of the PWM width settings over the preceding24 hours exceeds the reference value by more than fifty percent of thereference value, that is, when the average of the PWM width settingsover the preceding 24 hours exceeds a 75% duty cycle. Alternatively, themotor control module 702 may identify a degradation condition when anaverage of the PWM width settings over the preceding time intervalexceeds the reference value by a fixed amount (e.g., a 20% difference induty cycle).

When the motor control module 702 detects or otherwise identifies adegradation condition, the motor control module 702 provides anotification of the potential degradation to the pump control module 720or another supervisory system or module. For example, the motor controlmodule 702 may generate an interrupt signal that is handled by the pumpcontrol module 720 or another supervisory system, which, in turn,generates an audio and/or visual alert to the user that the drive systemshould be inspected. In the absence of a degradation condition, the loopdefined by tasks 1004, 1006, 1008 and 1010 repeats during operation ofthe motor 708 in accordance with the motor control process 800 tocontinuously monitor the PWM width settings of the PWM module 704 fordegradation in the drive system.

Referring to FIGS. 7-10, in accordance with one or more embodiments, themotor control process 800, the occlusion detection process 900, and thedegradation detection process 1000 are performed by the motor controlsystem 700 concurrently. For example, as described above in the contextof FIG. 8, the motor control module 702 may receive motor commands fromthe pump control module 720 and operate the motor 708 via the PWM module704 and the motor driver module 706 using closed-loop dynamic PWMcontrol to vary or otherwise adjust the PWM width setting of the PWMmodule 704 (i.e., the duty cycle of the pulse-width modulated voltageoutput of the PWM module 704) to achieve the desired rotation of themotor 708, and, in turn, achieve a desired dosage of fluid to the userby displacing the stopper 750 by the desired amount via the gearassembly 740. While operating the motor 708 in accordance with the motorcontrol process 800, the motor control module 702 may obtain the currentPWM width settings for the PWM module 704 and determine observed valuesfor the duty cycle metrics used for detecting an occlusion condition ora degradation condition. In this regard, when the PWM width settings forthe PWM module 704 rapidly increase or otherwise vary by a certainamount over a relative short period of time in a manner that ischaracteristic of an occlusion condition, the motor control module 702detects the occlusion condition and generates a notification of thepotential fluid path occlusion, as described above in the context ofocclusion detection process 900. In other situations, when the averagePWM width settings for the PWM module 704 gradually increase over alonger period of time and exceed a reference value that ischaracteristic of a degradation condition, the motor control module 702detects the degradation condition and generates a notification of thepotential drive system degradation, as described above in the context ofdegradation detection process 1000. In this regard, the motor controlmodule 702 may operate the motor 708 using dynamic PWM control to reducethe amount of power consumed by the motor 708 while concurrentlymonitoring the PWM width settings to identify potential fluid pathocclusions or drive system degradation that may impair operation of theinfusion pump.

The foregoing description may refer to elements or nodes or featuresbeing “connected” or “coupled” together. As used herein, unlessexpressly stated otherwise, “coupled” means that oneelement/node/feature is directly or indirectly joined to (or directly orindirectly communicates with) another element/node/feature, and notnecessarily mechanically. In addition, certain terminology may also beused in the herein for the purpose of reference only, and thus is notintended to be limiting. For example, terms such as “first”, “second”,and other such numerical terms referring to structures do not imply asequence or order unless clearly indicated by the context.

While at least one exemplary embodiment has been presented in theforegoing detailed description, it should be appreciated that a vastnumber of variations exist. It should also be appreciated that theexemplary embodiment or embodiments described herein are not intended tolimit the scope, applicability, or configuration of the claimed subjectmatter in any way. For example, the subject matter described herein isnot limited to the infusion devices and related systems describedherein. Moreover, the foregoing detailed description will provide thoseskilled in the art with a convenient road map for implementing thedescribed embodiment or embodiments. It should be understood thatvarious changes can be made in the function and arrangement of elementswithout departing from the scope defined by the claims, which includesknown equivalents and foreseeable equivalents at the time of filing thispatent application.

1-15. (canceled)
 16. An infusion device, comprising: a motor having arotor, wherein a modulated voltage having a duty cycle is applied to themotor, the modulated voltage oscillating between a first voltage and asecond voltage, the modulated voltage being equal to the first voltagefor a percentage of a time interval corresponding to the duty cycle; ashaft mechanically coupled to the rotor, the shaft being displaced todeliver fluid in response to rotation of the rotor; a sensor to obtain ameasured displacement that is influenced by rotation of the rotor; and acontrol module coupled to the motor and the sensor to operate the motorto provide a commanded rotation of the rotor and adjust the duty cyclefor the modulated voltage in response to a difference between anexpected displacement corresponding to the commanded rotation themeasured displacement obtained after operating the motor to provide thecommanded rotation.
 17. The infusion device of claim 16, wherein: thesensor obtains the measured displacement of the rotor after operatingthe motor to provide the commanded rotation; and the expecteddisplacement comprises the commanded rotation.
 18. The infusion deviceof claim 16, the commanded rotation corresponding to a commandeddisplacement of the shaft, wherein: the sensor obtains the measureddisplacement of the shaft after operating the motor to provide thecommanded rotation; and the expected displacement comprises thecommanded displacement of the shaft.
 19. The infusion device of claim16, wherein: adjusting the duty cycle comprises increasing the dutycycle to an increased duty cycle; and the control module operates themotor to compensate for the difference between the measured displacementand the expected displacement while the modulated voltage having theincreased duty cycle is applied to the motor.
 20. The infusion device ofclaim 16, further comprising a pulse-width modulation module coupled tothe motor, the modulated voltage comprising a pulse-width modulatedvoltage output generated by the pulse-width modulation module, whereinthe control module adjusts a duty cycle setting of the pulse-widthmodulation module in response to the difference between the expecteddisplacement and the measured displacement.
 21. The infusion device ofclaim 16, further comprising a reservoir having a stopper providedtherein, the stopper being coupled to the shaft such that displacementof the shaft results in displacement of the stopper, wherein thecommanded rotation corresponds to an amount of fluid to be dispensedfrom the reservoir.
 22. The infusion device of claim 21, wherein thecontrol module: identifies an anomalous condition based on the dutycycle; and generates a notification in response to detecting theanomalous condition.
 23. The infusion device of claim 22, wherein theanomalous condition comprises a degradation condition or an occlusioncondition in a fluid path from the reservoir.
 24. The infusion device ofclaim 16, wherein: the motor comprises a stepper motor; the sensorcomprises an incremental position sensor to detect incremental rotationsof the rotor; the measured displacement comprises a measured number ofthe incremental rotations; and the expected displacement comprises anexpected number of the incremental rotations expected to be detected bythe incremental position sensor in response to operating the motor toprovide the commanded rotation. 25-35. (canceled)
 36. The infusiondevice of claim 16, wherein the motor comprises a direct current motor.37. The infusion device of claim 16, further comprising a pulse-widthmodulation module coupled to the motor, the pulse-width modulationmodule generating a pulse-width modulated voltage output that is appliedto the motor, wherein the control module adjusts the duty cycle of thepulse-width modulated voltage output generated by the pulse-widthmodulation module in response to the difference.
 38. The infusion deviceof claim 37, further comprising a motor driver module coupled betweenthe pulse-width modulation module and the motor to apply the pulse-widthmodulated voltage output to the motor, wherein after adjusting the dutycycle, the control module operates the motor driver module to compensatefor the difference between the expected displacement and the measureddisplacement while the motor driver module applies the pulse-widthmodulated voltage output having the adjusted duty cycle to the motor.39. The infusion device of claim 16, wherein the control module:increases the duty cycle in response to the difference between theexpected displacement and the measured displacement; and decreases theduty cycle when the measured displacement is equal to the expecteddisplacement.
 40. The infusion device of claim 16, wherein the controlmodule determines the expected displacement based on the commandedrotation.
 41. The infusion device of claim 16, wherein: the sensorcomprises an incremental position sensor to detect incremental rotationsof the rotor; the measured displacement comprises a measured number ofthe incremental rotations; and the expected displacement comprises anexpected number of the incremental rotations expected to be detected bythe incremental position sensor in response to the commanded rotation.42. The infusion device of claim 41, wherein the incremental positionsensor comprises a rotary encoder.
 43. The infusion device of claim 41,wherein: the motor has a first number of motor steps per revolution ofthe rotor; the incremental position sensor detects a second number ofthe incremental rotations per revolution of the rotor; the commandedrotation comprises a commanded number of motor steps; and the controlmodule determines the expected number of the incremental rotations basedon the commanded number and a relationship between the second number andthe first number.
 44. The infusion device of claim 43, wherein thecontrol module determines the expected number by multiplying thecommanded number by a ratio of the second number to the first number.45. The infusion device of claim 16, wherein the motor comprises astepper motor.
 46. The infusion device of claim 45, the commandedrotation comprising a number of commanded motor steps, wherein thecontrol module determines the expected displacement based on the numberof commanded motor steps.
 47. The infusion device of claim 46, wherein:the sensor comprises an incremental position sensor to detect a firstnumber of incremental rotations of the rotor per revolution of therotor; the stepper motor has a second number of motor steps perrevolution of the rotor; and the control module determines the expecteddisplacement as an expected number of incremental rotations expected tobe detected by the incremental position sensor in response to thecommanded rotation based on the number of commanded motor steps and arelationship between the first number and the second number.
 48. Theinfusion device of claim 47, wherein the measured displacement comprisesa measured number of incremental rotations detected by the incrementalposition sensor when the motor is operated to provide the commandedrotation.
 49. The infusion device of claim 48, wherein the controlmodule: determines an increase amount based on the difference betweenthe expected number of incremental rotations and the measured number ofincremental rotations; and increases the duty cycle by the increaseamount.
 50. The infusion device of claim 49, further comprising a motordriver module coupled to the motor to apply the modulated voltage to themotor, wherein the control module: determines a number of missed motorsteps based on a difference between the expected number of incrementalrotations and the measured number of incremental rotations; and operatesthe motor driver module to compensate for the number of missed motorsteps while the motor driver module applies the modulated voltage havingthe increased duty cycle.
 51. An infusion device, comprising: a motorhaving a rotor; a shaft mechanically coupled to the rotor, the shaftbeing displaced to deliver fluid in response to rotation of the rotor; asensor to obtain a measured displacement that is influenced by rotationof the rotor; and a control module coupled to the motor and the sensorto operate the motor to provide a commanded rotation of the rotor whilea modulated voltage is applied to the motor, increase a duty cycle forthe modulated voltage in response to a difference between an expecteddisplacement corresponding to the commanded rotation the measureddisplacement obtained after operating the motor to provide the commandedrotation, and decrease the duty cycle when the measured displacement isequal to the expected displacement.
 52. An infusion device, comprising:a stepper motor having a rotor, the stepper motor having a first numberof motor steps per revolution of the rotor; a shaft mechanically coupledto the rotor, the shaft being displaced to deliver fluid in response torotation of the rotor; an incremental position sensor to obtain ameasured number of incremental rotations of the rotor, the incrementalposition sensor detecting a second number of incremental rotations ofthe rotor per revolution of the rotor; and a control module coupled tothe stepper motor and the incremental position sensor to: operate themotor to provide a number of commanded motor steps of rotation of therotor while a modulated voltage is applied to the motor; determine anexpected number of incremental rotations expected to be detected by theincremental position sensor in response to the number of commanded motorsteps based on the number of commanded motor steps and a relationshipbetween the first number and the second number; and adjust a duty cyclefor the modulated voltage in response to a difference between theexpected number of incremental rotations and the measured number ofincremental rotations obtained after operating the motor to provide thenumber of commanded motor steps.
 53. The infusion device of claim 52,wherein the control module: determines an increase amount based on thedifference between the expected number of incremental rotations and themeasured number of incremental rotations; and increases the duty cycleby the increase amount.
 54. The infusion device of claim 53, furthercomprising a motor driver module coupled to the motor to apply themodulated voltage to the motor, wherein the control module: determines anumber of missed motor steps based on a difference between the expectednumber of incremental rotations and the measured number of incrementalrotations; and operates the motor driver module to compensate for thenumber of missed motor steps while the motor driver module applies themodulated voltage having the increased duty cycle.
 55. The infusiondevice of claim 16, wherein the first voltage is a supply voltage andthe second voltage is a ground voltage.
 56. The infusion device of claim16, wherein the modulated voltage comprises a square wave having amagnitude equal to the first voltage for the percentage of the timeinterval and equal to the second voltage for a remaining percentage ofthe time interval.
 57. The infusion device of claim 56, wherein thefirst voltage is a supply voltage and the second voltage is a groundvoltage.
 58. The infusion device of claim 16, wherein the modulatedvoltage comprises a square wave, the duty cycle corresponding to a widthof the square wave.